package com.zzy.demo;

import java.util.HashSet;
import java.util.Set;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
/**
 * 
 * @author guokaige
 *
 */
@SpringBootApplication
@ServletComponentScan("com.zzy")
@ComponentScan("com.zzy")
public class DemoApplication {
	
	public static ApplicationContext applicationContext;

	public static void main(String[] args) {
		
		SpringApplication app = new SpringApplication(DemoApplication.class);
		app.setWebEnvironment(true); //true后台运行   false运行完之后结束
		Set<Object> set = new HashSet<Object>();
		//set.add("classpath:applicationContext.xml");
		app.setSources(set);
		applicationContext = app.run(args);
		
	}
}
